﻿// ***************************************************************
//  event   version:  1.0   ·  date: 05/29/2010
//  -------------------------------------------------------------
//  事件头文件
//  -------------------------------------------------------------
//  Copyright (C) 2010 - All Rights Reserved
// ***************************************************************
// 
// ***************************************************************
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#ifndef ccs_util_event_h__
#define ccs_util_event_h__

#include <boost/signals/connection.hpp>
#include <boost/signals/signal3.hpp>
#include <boost/signals/signal2.hpp>
#include <boost/function/function3.hpp>
#include <map>

#include "ccs_util/archive.hpp"

namespace ccs
{
	class dynamic_class;
	namespace event
	{
		typedef boost::BOOST_SIGNALS_NAMESPACE::connection connection;
		typedef boost::BOOST_SIGNALS_NAMESPACE::scoped_connection scoped_connection;

		typedef boost::signal2<void, std::string const&, iarchive&> signal2;
		typedef boost::signal3<void, dynamic_class&, std::string const&, iarchive&> signal;
		typedef std::map<std::string, event::signal> event_set;
		typedef std::map<std::string, event::signal2> event_set2;
		typedef boost::function3<void, dynamic_class&, std::string const&, iarchive&> slot;
		typedef boost::function2<void, std::string const&, iarchive&> slot2;
	}
}

#endif /*ccs_util_event_h__*/